import { request } from "./request";

// 获取优惠券列表
export function getCoupons(userId) {
  return request({
    method: 'GET',
    url: '/coupon/getcoupon',
    params: {
      userId: userId
    }
  })
}

// 兑换优惠券
export function exchangeCoupons(CouponsData) {
  return request({
    method: 'POST',
    url: '/coupon/exchange',
    data: CouponsData
  })
}

// 删除
export function deleteCoupons(CouponsInfo) {
  return request({
    method: 'POST',
    url: '/coupon/delete',
    data: CouponsInfo
  })
}